<?php

class Core_Component_Login_Controller_Backend_Logout {

    function indexAction() {
        if ($GLOBALS[RC]->getIdentity()->isLogin()) {
            $GLOBALS[RC]->getIdentity()->logout();
            $GLOBALS[RC]->getSession()->abort();
            header("Expires: Mon, 26 Jul 1970 05:00:00 GMT");
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            header("Cache-Control: no-cache, must-revalidate");
            header("Pragma: no-cache");
        }
        echo '<meta http-equiv=refresh content="0;url=' . $GLOBALS[RC]->getRouter()->buildUrl('*/index/index/index') . '">';
        die();
    }

}